package c03数据类型和运算符;

public class 其他常量池地址研究 {

	private static final Integer S0 = 1000;
	private static final Integer S1 = 1000;

	public static void main(String[] args) {
		Integer s0 = 1000;
		Integer s1 = 400;
		final Integer s12 = 400;
		Integer s2 = 600;
		final Integer s22 = 600;
		Integer s3 = 400 + 600;
		Integer s4 = s1 + s2;
		Integer s42 = s12 + s22;
		Integer s5 = new Integer(1000);

		System.err.println(S0 == S1);
		System.err.println(s0 == S0);
		System.err.println(s0 == S1);

		System.err.println("----------------");
		System.err.println(s0==1000);
		System.err.println(s0 == s3);
		System.err.println(s0 == s4);
		System.err.println(s0 == s42);
		System.err.println(s0 == s5);
		System.err.println(s4 == s5);

		System.err.println("----------------");
		System.err.println(S0==其他常量池地址研究2.S0);
	}

}
